﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace EPiSugar.Configuration
{
    public class TypeMappingCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new TypeMappingElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((TypeMappingElement) element).PageTypeID;
        }

        [ConfigurationProperty("fallbackType")]
        public string FallbackType
        {
            get { return (string)this["fallbackType"]; }
            set { this["fallbackType"] = value; }
        }

        public virtual void Add(TypeMappingElement element)
        {
            base.BaseAdd(element);
        }
    }
}
